package com.itheima.service.db.impl;

import com.itheima.domain.db.User;
import com.itheima.mapper.UserMapper;
import com.itheima.service.db.PhoneService;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

@DubboService
public class PhoneServiceImpl implements PhoneService {

    @Autowired
    private UserMapper userMapper;

    //更改手机号码
    @Override
    public void updatePhone(User user) {
        userMapper.updateById(user);
    }

    //根据id查询用户
    @Override
    public User findUser(Long userId) {
        return userMapper.selectById(userId);
    }
}
